// Page.cpp : implementation file
//

#include "stdafx.h"
#include "ListPropertyDlgDemo.h"
#include "Page.h"

#ifdef _DEBUG
#define new DEBUG_NEW
#undef THIS_FILE
static char THIS_FILE[] = __FILE__;
#endif

/////////////////////////////////////////////////////////////////////////////
// CPage dialog


CPage::CPage(UINT nIDTemplate, CWnd* pParent/* = NULL*/)
			 : CDialog(nIDTemplate, pParent)
{
	//{{AFX_DATA_INIT(CPage)
		// NOTE: the ClassWizard will add member initialization here
	//}}AFX_DATA_INIT
}


// void CPage::DoDataExchange(CDataExchange* pDX)
// {
// 	CDialog::DoDataExchange(pDX);
// 	//{{AFX_DATA_MAP(CPage)
// 		// NOTE: the ClassWizard will add DDX and DDV calls here
// 	//}}AFX_DATA_MAP
// }


BEGIN_MESSAGE_MAP(CPage, CDialog)
	//{{AFX_MSG_MAP(CPage)
	ON_WM_CTLCOLOR()
	//}}AFX_MSG_MAP
END_MESSAGE_MAP()

/////////////////////////////////////////////////////////////////////////////
// CPage message handlers

HBRUSH CPage::OnCtlColor(CDC* pDC, CWnd* pWnd, UINT nCtlColor) 
{
	HBRUSH hbr = CDialog::OnCtlColor(pDC, pWnd, nCtlColor);
	
	// TODO: Change any attributes of the DC here

	// TODO: Return a different brush if the default is not desired
	if(nCtlColor == CTLCOLOR_DLG || nCtlColor == CTLCOLOR_STATIC)
	{
		if(m_brhBk.GetSafeHandle())
			return m_brhBk;
		else
			return (HBRUSH)GetStockObject(WHITE_BRUSH);
	}
	else
		return hbr;
}

void CPage::SetBkColor(COLORREF clrBk)
{
	m_brhBk.CreateSolidBrush(clrBk);
}

//DEL void CPage::OnOK()
//DEL {
//DEL 
//DEL }

//DEL void CPage::OnCancel()
//DEL {
//DEL 
//DEL }
